3.4.61 \(\int (f x)^{-1+m} (d+e x^m) (a+b \log (c x^n))^2 \, dx\) [361]

Optimal. Leaf size=226 \[ \frac {2 b^2 d n^2 x (f x)^{-1+m}}{m^3}+\frac {b^2 e n^2 x^{1+m} (f x)^{-1+m}}{4 m^3}+\frac {b^2 d^2 n^2 x^{1-m} (f x)^{-1+m} \log ^2(x)}{2 e m}-\frac {2 b d n x (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right )}{m^2}-\frac {b e n x^{1+m} (f x)^{-1+m} \left (a+b \log \left (c x^n\right )\right )}{2 m^2}-\frac {b d^2 n x^{1-m} (f x)^{-1+m} \log (x) \left (a+b \log \left (c x^n\right )\right )}{e m}+\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e m} \]

[Out]

2*b^2*d*n^2*x*(f*x)^(-1+m)/m^3+1/4*b^2*e*n^2*x^(1+m)*(f*x)^(-1+m)/m^3+1/2*b^2*d^2*n^2*x^(1-m)*(f*x)^(-1+m)*ln(
x)^2/e/m-2*b*d*n*x*(f*x)^(-1+m)*(a+b*ln(c*x^n))/m^2-1/2*b*e*n*x^(1+m)*(f*x)^(-1+m)*(a+b*ln(c*x^n))/m^2-b*d^2*n
*x^(1-m)*(f*x)^(-1+m)*ln(x)*(a+b*ln(c*x^n))/e/m+1/2*x^(1-m)*(f*x)^(-1+m)*(d+e*x^m)^2*(a+b*ln(c*x^n))^2/e/m

________________________________________________________________________________________

Rubi [A]
time = 0.20, antiderivative size = 226, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 8, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.296, Rules used = {2377, 2376, 272, 45, 2372, 12, 14, 2338} \begin {gather*} -\frac {b d^2 n x^{1-m} \log (x) (f x)^{m-1} \left (a+b \log \left (c x^n\right )\right )}{e m}+\frac {x^{1-m} (f x)^{m-1} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e m}-\frac {2 b d n x (f x)^{m-1} \left (a+b \log \left (c x^n\right )\right )}{m^2}-\frac {b e n x^{m+1} (f x)^{m-1} \left (a+b \log \left (c x^n\right )\right )}{2 m^2}+\frac {b^2 d^2 n^2 x^{1-m} \log ^2(x) (f x)^{m-1}}{2 e m}+\frac {2 b^2 d n^2 x (f x)^{m-1}}{m^3}+\frac {b^2 e n^2 x^{m+1} (f x)^{m-1}}{4 m^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(f*x)^(-1 + m)*(d + e*x^m)*(a + b*Log[c*x^n])^2,x]

[Out]

(2*b^2*d*n^2*x*(f*x)^(-1 + m))/m^3 + (b^2*e*n^2*x^(1 + m)*(f*x)^(-1 + m))/(4*m^3) + (b^2*d^2*n^2*x^(1 - m)*(f*
x)^(-1 + m)*Log[x]^2)/(2*e*m) - (2*b*d*n*x*(f*x)^(-1 + m)*(a + b*Log[c*x^n]))/m^2 - (b*e*n*x^(1 + m)*(f*x)^(-1
 + m)*(a + b*Log[c*x^n]))/(2*m^2) - (b*d^2*n*x^(1 - m)*(f*x)^(-1 + m)*Log[x]*(a + b*Log[c*x^n]))/(e*m) + (x^(1
 - m)*(f*x)^(-1 + m)*(d + e*x^m)^2*(a + b*Log[c*x^n])^2)/(2*e*m)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 2376

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_))^(q_.), x_Symbol] :
> Simp[f^m*(d + e*x^r)^(q + 1)*((a + b*Log[c*x^n])^p/(e*r*(q + 1))), x] - Dist[b*f^m*n*(p/(e*r*(q + 1))), Int[
(d + e*x^r)^(q + 1)*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && EqQ[
m, r - 1] && IGtQ[p, 0] && (IntegerQ[m] || GtQ[f, 0]) && NeQ[r, n] && NeQ[q, -1]

Rule 2377

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_))^(q_.), x_Symbol] :>
 Dist[(f*x)^m/x^m, Int[x^m*(d + e*x^r)^q*(a + b*Log[c*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r},
 x] && EqQ[m, r - 1] && IGtQ[p, 0] &&  !(IntegerQ[m] || GtQ[f, 0])

Rubi steps

\begin {align*} \int (f x)^{-1+m} \left (d+e x^m\right ) \left (a+b \log \left (c x^n\right )\right )^2 \, dx &=\left (x^{1-m} (f x)^{-1+m}\right ) \int x^{-1+m} \left (d+e x^m\right ) \left (a+b \log \left (c x^n\right )\right )^2 \, dx\\ &=\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e m}-\frac {\left (b n x^{1-m} (f x)^{-1+m}\right ) \int \frac {\left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx}{e m}\\ &=-\frac {b n x^{1-m} (f x)^{-1+m} \left (\frac {4 d e x^m}{m}+\frac {e^2 x^{2 m}}{m}+2 d^2 \log (x)\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e m}+\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e m}+\frac {\left (b^2 n^2 x^{1-m} (f x)^{-1+m}\right ) \int \frac {e x^m \left (4 d+e x^m\right )+2 d^2 m \log (x)}{2 m x} \, dx}{e m}\\ &=-\frac {b n x^{1-m} (f x)^{-1+m} \left (\frac {4 d e x^m}{m}+\frac {e^2 x^{2 m}}{m}+2 d^2 \log (x)\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e m}+\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e m}+\frac {\left (b^2 n^2 x^{1-m} (f x)^{-1+m}\right ) \int \frac {e x^m \left (4 d+e x^m\right )+2 d^2 m \log (x)}{x} \, dx}{2 e m^2}\\ &=-\frac {b n x^{1-m} (f x)^{-1+m} \left (\frac {4 d e x^m}{m}+\frac {e^2 x^{2 m}}{m}+2 d^2 \log (x)\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e m}+\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e m}+\frac {\left (b^2 n^2 x^{1-m} (f x)^{-1+m}\right ) \int \left (4 d e x^{-1+m}+e^2 x^{-1+2 m}+\frac {2 d^2 m \log (x)}{x}\right ) \, dx}{2 e m^2}\\ &=\frac {2 b^2 d n^2 x (f x)^{-1+m}}{m^3}+\frac {b^2 e n^2 x^{1+m} (f x)^{-1+m}}{4 m^3}-\frac {b n x^{1-m} (f x)^{-1+m} \left (\frac {4 d e x^m}{m}+\frac {e^2 x^{2 m}}{m}+2 d^2 \log (x)\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e m}+\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e m}+\frac {\left (b^2 d^2 n^2 x^{1-m} (f x)^{-1+m}\right ) \int \frac {\log (x)}{x} \, dx}{e m}\\ &=\frac {2 b^2 d n^2 x (f x)^{-1+m}}{m^3}+\frac {b^2 e n^2 x^{1+m} (f x)^{-1+m}}{4 m^3}+\frac {b^2 d^2 n^2 x^{1-m} (f x)^{-1+m} \log ^2(x)}{2 e m}-\frac {b n x^{1-m} (f x)^{-1+m} \left (\frac {4 d e x^m}{m}+\frac {e^2 x^{2 m}}{m}+2 d^2 \log (x)\right ) \left (a+b \log \left (c x^n\right )\right )}{2 e m}+\frac {x^{1-m} (f x)^{-1+m} \left (d+e x^m\right )^2 \left (a+b \log \left (c x^n\right )\right )^2}{2 e m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 125, normalized size = 0.55 \begin {gather*} \frac {(f x)^m \left (2 a^2 m^2 \left (2 d+e x^m\right )-2 a b m n \left (4 d+e x^m\right )+b^2 n^2 \left (8 d+e x^m\right )-2 b m \left (-2 a m \left (2 d+e x^m\right )+b n \left (4 d+e x^m\right )\right ) \log \left (c x^n\right )+2 b^2 m^2 \left (2 d+e x^m\right ) \log ^2\left (c x^n\right )\right )}{4 f m^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(f*x)^(-1 + m)*(d + e*x^m)*(a + b*Log[c*x^n])^2,x]

[Out]

((f*x)^m*(2*a^2*m^2*(2*d + e*x^m) - 2*a*b*m*n*(4*d + e*x^m) + b^2*n^2*(8*d + e*x^m) - 2*b*m*(-2*a*m*(2*d + e*x
^m) + b*n*(4*d + e*x^m))*Log[c*x^n] + 2*b^2*m^2*(2*d + e*x^m)*Log[c*x^n]^2))/(4*f*m^3)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.19, size = 1919, normalized size = 8.49

method result size
risch \(\text {Expression too large to display}\) \(1919\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^(-1+m)*(d+e*x^m)*(a+b*ln(c*x^n))^2,x,method=_RETURNVERBOSE)

[Out]

1/2*b^2*(e*x^m+2*d)*x/m*exp(1/2*(-1+m)*(-I*Pi*csgn(I*f*x)^3+I*Pi*csgn(I*f*x)^2*csgn(I*f)+I*Pi*csgn(I*f*x)^2*cs
gn(I*x)-I*Pi*csgn(I*f*x)*csgn(I*f)*csgn(I*x)+2*ln(x)+2*ln(f)))*ln(x^n)^2-1/2*b*(I*Pi*b*e*csgn(I*c)*csgn(I*x^n)
*csgn(I*c*x^n)*x^m*m-I*Pi*b*e*csgn(I*c)*csgn(I*c*x^n)^2*x^m*m-I*Pi*b*e*csgn(I*x^n)*csgn(I*c*x^n)^2*x^m*m+I*Pi*
b*e*csgn(I*c*x^n)^3*x^m*m+2*I*Pi*b*d*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*m-2*I*Pi*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I*c)^2*csgn(I*x^n)^2*csgn(I*c*x^n)^2*m^2+4*
Pi^2*b^2*d*csgn(I*c)^2*csgn(I*x^n)*csgn(I*c*x^n)^3*m^2-Pi^2*b^2*e*csgn(I*c)^2*csgn(I*c*x^n)^4*x^m*m^2+2*I*Pi*b
^2*e*m*n*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)*x^m+8*ln(c)*a*b*e*x^m*m^2+8*I*Pi*ln(c)*b^2*d*csgn(I*c)*csgn(I*c*x
^n)^2*m^2+8*I*Pi*ln(c)*b^2*d*csgn(I*x^n)*csgn(I*c*x^n)^2*m^2-Pi^2*b^2*e*csgn(I*c)^2*csgn(I*x^n)^2*csgn(I*c*x^n
)^2*x^m*m^2+2*Pi^2*b^2*e*csgn(I*c)^2*csgn(I*x^n)*csgn(I*c*x^n)^3*x^m*m^2+2*Pi^2*b^2*e*csgn(I*c)*csgn(I*x^n)^2*
csgn(I*c*x^n)^3*x^m*m^2-4*ln(c)*b^2*e*m*n*x^m)*x/m^3*exp(1/2*(-1+m)*(-I*Pi*csgn(I*f*x)^3+I*Pi*csgn(I*f*x)^2*cs
gn(I*f)+I*Pi*csgn(I*f*x)^2*csgn(I*x)-I*Pi*csgn(I*f*x)*csgn(I*f)*csgn(I*x)+2*ln(x)+2*ln(f)))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 266, normalized size = 1.18 \begin {gather*} \frac {b^{2} f^{m - 1} e^{\left (2 \, m \log \left (x\right ) + 1\right )} \log \left (c x^{n}\right )^{2}}{2 \, m} - 2 \, {\left (\frac {f^{m - 1} n x^{m} \log \left (c x^{n}\right )}{m^{2}} - \frac {f^{m - 1} n^{2} x^{m}}{m^{3}}\right )} b^{2} d - \frac {2 \, a b d f^{m - 1} n x^{m}}{m^{2}} - \frac {1}{4} \, {\left (\frac {2 \, f^{m - 1} n x^{2 \, m} \log \left (c x^{n}\right )}{m^{2}} - \frac {f^{m - 1} n^{2} x^{2 \, m}}{m^{3}}\right )} b^{2} e + \frac {a b f^{m - 1} e^{\left (2 \, m \log \left (x\right ) + 1\right )} \log \left (c x^{n}\right )}{m} + \frac {\left (f x\right )^{m} b^{2} d \log \left (c x^{n}\right )^{2}}{f m} + \frac {a^{2} f^{m - 1} e^{\left (2 \, m \log \left (x\right ) + 1\right )}}{2 \, m} - \frac {a b f^{m - 1} n e^{\left (2 \, m \log \left (x\right ) + 1\right )}}{2 \, m^{2}} + \frac {2 \, \left (f x\right )^{m} a b d \log \left (c x^{n}\right )}{f m} + \frac {\left (f x\right )^{m} a^{2} d}{f m} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(d+e*x^m)*(a+b*log(c*x^n))^2,x, algorithm="maxima")

[Out]

1/2*b^2*f^(m - 1)*e^(2*m*log(x) + 1)*log(c*x^n)^2/m - 2*(f^(m - 1)*n*x^m*log(c*x^n)/m^2 - f^(m - 1)*n^2*x^m/m^
3)*b^2*d - 2*a*b*d*f^(m - 1)*n*x^m/m^2 - 1/4*(2*f^(m - 1)*n*x^(2*m)*log(c*x^n)/m^2 - f^(m - 1)*n^2*x^(2*m)/m^3
)*b^2*e + a*b*f^(m - 1)*e^(2*m*log(x) + 1)*log(c*x^n)/m + (f*x)^m*b^2*d*log(c*x^n)^2/(f*m) + 1/2*a^2*f^(m - 1)
*e^(2*m*log(x) + 1)/m - 1/2*a*b*f^(m - 1)*n*e^(2*m*log(x) + 1)/m^2 + 2*(f*x)^m*a*b*d*log(c*x^n)/(f*m) + (f*x)^
m*a^2*d/(f*m)

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 250, normalized size = 1.11 \begin {gather*} \frac {{\left (2 \, b^{2} m^{2} n^{2} e \log \left (x\right )^{2} + 2 \, b^{2} m^{2} e \log \left (c\right )^{2} + 2 \, {\left (2 \, a b m^{2} - b^{2} m n\right )} e \log \left (c\right ) + {\left (2 \, a^{2} m^{2} - 2 \, a b m n + b^{2} n^{2}\right )} e + 2 \, {\left (2 \, b^{2} m^{2} n e \log \left (c\right ) + {\left (2 \, a b m^{2} n - b^{2} m n^{2}\right )} e\right )} \log \left (x\right )\right )} f^{m - 1} x^{2 \, m} + 4 \, {\left (b^{2} d m^{2} n^{2} \log \left (x\right )^{2} + b^{2} d m^{2} \log \left (c\right )^{2} + a^{2} d m^{2} - 2 \, a b d m n + 2 \, b^{2} d n^{2} + 2 \, {\left (a b d m^{2} - b^{2} d m n\right )} \log \left (c\right ) + 2 \, {\left (b^{2} d m^{2} n \log \left (c\right ) + a b d m^{2} n - b^{2} d m n^{2}\right )} \log \left (x\right )\right )} f^{m - 1} x^{m}}{4 \, m^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(d+e*x^m)*(a+b*log(c*x^n))^2,x, algorithm="fricas")

[Out]

1/4*((2*b^2*m^2*n^2*e*log(x)^2 + 2*b^2*m^2*e*log(c)^2 + 2*(2*a*b*m^2 - b^2*m*n)*e*log(c) + (2*a^2*m^2 - 2*a*b*
m*n + b^2*n^2)*e + 2*(2*b^2*m^2*n*e*log(c) + (2*a*b*m^2*n - b^2*m*n^2)*e)*log(x))*f^(m - 1)*x^(2*m) + 4*(b^2*d
*m^2*n^2*log(x)^2 + b^2*d*m^2*log(c)^2 + a^2*d*m^2 - 2*a*b*d*m*n + 2*b^2*d*n^2 + 2*(a*b*d*m^2 - b^2*d*m*n)*log
(c) + 2*(b^2*d*m^2*n*log(c) + a*b*d*m^2*n - b^2*d*m*n^2)*log(x))*f^(m - 1)*x^m)/m^3

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1535 vs. \(2 (212) = 424\).
time = 47.98, size = 1535, normalized size = 6.79 \begin {gather*} \begin {cases} \tilde {\infty } \left (d + e\right ) \left (a^{2} x - 2 a b n x + 2 a b x \log {\left (c x^{n} \right )} + 2 b^{2} n^{2} x - 2 b^{2} n x \log {\left (c x^{n} \right )} + b^{2} x \log {\left (c x^{n} \right )}^{2}\right ) & \text {for}\: f = 0 \wedge m = 0 \\\frac {\left (d + e\right ) \left (\begin {cases} \frac {a^{2} \log {\left (c x^{n} \right )} + a b \log {\left (c x^{n} \right )}^{2} + \frac {b^{2} \log {\left (c x^{n} \right )}^{3}}{3}}{n} & \text {for}\: n \neq 0 \\\left (a^{2} + 2 a b \log {\left (c \right )} + b^{2} \log {\left (c \right )}^{2}\right ) \log {\left (x \right )} & \text {otherwise} \end {cases}\right )}{f} & \text {for}\: m = 0 \\0^{m - 1} \left (\frac {a^{2} d m^{3} x}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {3 a^{2} d m^{2} x}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {3 a^{2} d m x}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {a^{2} d x}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {a^{2} e m^{2} x x^{m}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {2 a^{2} e m x x^{m}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {a^{2} e x x^{m}}{m^{3} + 3 m^{2} + 3 m + 1} - \frac {2 a b d m^{3} n x}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {2 a b d m^{3} x \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} - \frac {6 a b d m^{2} n x}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {6 a b d m^{2} x \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} - \frac {6 a b d m n x}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {6 a b d m x \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} - \frac {2 a b d n x}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {2 a b d x \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {2 a b e m^{2} x x^{m} \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} - \frac {2 a b e m n x x^{m}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {4 a b e m x x^{m} \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} - \frac {2 a b e n x x^{m}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {2 a b e x x^{m} \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {2 b^{2} d m^{3} n^{2} x}{m^{3} + 3 m^{2} + 3 m + 1} - \frac {2 b^{2} d m^{3} n x \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {b^{2} d m^{3} x \log {\left (c x^{n} \right )}^{2}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {6 b^{2} d m^{2} n^{2} x}{m^{3} + 3 m^{2} + 3 m + 1} - \frac {6 b^{2} d m^{2} n x \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {3 b^{2} d m^{2} x \log {\left (c x^{n} \right )}^{2}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {6 b^{2} d m n^{2} x}{m^{3} + 3 m^{2} + 3 m + 1} - \frac {6 b^{2} d m n x \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {3 b^{2} d m x \log {\left (c x^{n} \right )}^{2}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {2 b^{2} d n^{2} x}{m^{3} + 3 m^{2} + 3 m + 1} - \frac {2 b^{2} d n x \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {b^{2} d x \log {\left (c x^{n} \right )}^{2}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {b^{2} e m^{2} x x^{m} \log {\left (c x^{n} \right )}^{2}}{m^{3} + 3 m^{2} + 3 m + 1} - \frac {2 b^{2} e m n x x^{m} \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {2 b^{2} e m x x^{m} \log {\left (c x^{n} \right )}^{2}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {2 b^{2} e n^{2} x x^{m}}{m^{3} + 3 m^{2} + 3 m + 1} - \frac {2 b^{2} e n x x^{m} \log {\left (c x^{n} \right )}}{m^{3} + 3 m^{2} + 3 m + 1} + \frac {b^{2} e x x^{m} \log {\left (c x^{n} \right )}^{2}}{m^{3} + 3 m^{2} + 3 m + 1}\right ) & \text {for}\: f = 0 \\\frac {a^{2} d \left (f x\right )^{m}}{f m} + \frac {a^{2} e x^{m} \left (f x\right )^{m}}{2 f m} + \frac {2 a b d \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{f m} - \frac {2 a b d n \left (f x\right )^{m}}{f m^{2}} + \frac {a b e x^{m} \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{f m} - \frac {a b e n x^{m} \left (f x\right )^{m}}{2 f m^{2}} + \frac {b^{2} d \left (f x\right )^{m} \log {\left (c x^{n} \right )}^{2}}{f m} - \frac {2 b^{2} d n \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{f m^{2}} + \frac {2 b^{2} d n^{2} \left (f x\right )^{m}}{f m^{3}} + \frac {b^{2} e x^{m} \left (f x\right )^{m} \log {\left (c x^{n} \right )}^{2}}{2 f m} - \frac {b^{2} e n x^{m} \left (f x\right )^{m} \log {\left (c x^{n} \right )}}{2 f m^{2}} + \frac {b^{2} e n^{2} x^{m} \left (f x\right )^{m}}{4 f m^{3}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)**(-1+m)*(d+e*x**m)*(a+b*ln(c*x**n))**2,x)

[Out]

Piecewise((zoo*(d + e)*(a**2*x - 2*a*b*n*x + 2*a*b*x*log(c*x**n) + 2*b**2*n**2*x - 2*b**2*n*x*log(c*x**n) + b*
*2*x*log(c*x**n)**2), Eq(f, 0) & Eq(m, 0)), ((d + e)*Piecewise(((a**2*log(c*x**n) + a*b*log(c*x**n)**2 + b**2*
log(c*x**n)**3/3)/n, Ne(n, 0)), ((a**2 + 2*a*b*log(c) + b**2*log(c)**2)*log(x), True))/f, Eq(m, 0)), (0**(m -
1)*(a**2*d*m**3*x/(m**3 + 3*m**2 + 3*m + 1) + 3*a**2*d*m**2*x/(m**3 + 3*m**2 + 3*m + 1) + 3*a**2*d*m*x/(m**3 +
 3*m**2 + 3*m + 1) + a**2*d*x/(m**3 + 3*m**2 + 3*m + 1) + a**2*e*m**2*x*x**m/(m**3 + 3*m**2 + 3*m + 1) + 2*a**
2*e*m*x*x**m/(m**3 + 3*m**2 + 3*m + 1) + a**2*e*x*x**m/(m**3 + 3*m**2 + 3*m + 1) - 2*a*b*d*m**3*n*x/(m**3 + 3*
m**2 + 3*m + 1) + 2*a*b*d*m**3*x*log(c*x**n)/(m**3 + 3*m**2 + 3*m + 1) - 6*a*b*d*m**2*n*x/(m**3 + 3*m**2 + 3*m
 + 1) + 6*a*b*d*m**2*x*log(c*x**n)/(m**3 + 3*m**2 + 3*m + 1) - 6*a*b*d*m*n*x/(m**3 + 3*m**2 + 3*m + 1) + 6*a*b
*d*m*x*log(c*x**n)/(m**3 + 3*m**2 + 3*m + 1) - 2*a*b*d*n*x/(m**3 + 3*m**2 + 3*m + 1) + 2*a*b*d*x*log(c*x**n)/(
m**3 + 3*m**2 + 3*m + 1) + 2*a*b*e*m**2*x*x**m*log(c*x**n)/(m**3 + 3*m**2 + 3*m + 1) - 2*a*b*e*m*n*x*x**m/(m**
3 + 3*m**2 + 3*m + 1) + 4*a*b*e*m*x*x**m*log(c*x**n)/(m**3 + 3*m**2 + 3*m + 1) - 2*a*b*e*n*x*x**m/(m**3 + 3*m*
*2 + 3*m + 1) + 2*a*b*e*x*x**m*log(c*x**n)/(m**3 + 3*m**2 + 3*m + 1) + 2*b**2*d*m**3*n**2*x/(m**3 + 3*m**2 + 3
*m + 1) - 2*b**2*d*m**3*n*x*log(c*x**n)/(m**3 + 3*m**2 + 3*m + 1) + b**2*d*m**3*x*log(c*x**n)**2/(m**3 + 3*m**
2 + 3*m + 1) + 6*b**2*d*m**2*n**2*x/(m**3 + 3*m**2 + 3*m + 1) - 6*b**2*d*m**2*n*x*log(c*x**n)/(m**3 + 3*m**2 +
 3*m + 1) + 3*b**2*d*m**2*x*log(c*x**n)**2/(m**3 + 3*m**2 + 3*m + 1) + 6*b**2*d*m*n**2*x/(m**3 + 3*m**2 + 3*m
+ 1) - 6*b**2*d*m*n*x*log(c*x**n)/(m**3 + 3*m**2 + 3*m + 1) + 3*b**2*d*m*x*log(c*x**n)**2/(m**3 + 3*m**2 + 3*m
 + 1) + 2*b**2*d*n**2*x/(m**3 + 3*m**2 + 3*m + 1) - 2*b**2*d*n*x*log(c*x**n)/(m**3 + 3*m**2 + 3*m + 1) + b**2*
d*x*log(c*x**n)**2/(m**3 + 3*m**2 + 3*m + 1) + b**2*e*m**2*x*x**m*log(c*x**n)**2/(m**3 + 3*m**2 + 3*m + 1) - 2
*b**2*e*m*n*x*x**m*log(c*x**n)/(m**3 + 3*m**2 + 3*m + 1) + 2*b**2*e*m*x*x**m*log(c*x**n)**2/(m**3 + 3*m**2 + 3
*m + 1) + 2*b**2*e*n**2*x*x**m/(m**3 + 3*m**2 + 3*m + 1) - 2*b**2*e*n*x*x**m*log(c*x**n)/(m**3 + 3*m**2 + 3*m
+ 1) + b**2*e*x*x**m*log(c*x**n)**2/(m**3 + 3*m**2 + 3*m + 1)), Eq(f, 0)), (a**2*d*(f*x)**m/(f*m) + a**2*e*x**
m*(f*x)**m/(2*f*m) + 2*a*b*d*(f*x)**m*log(c*x**n)/(f*m) - 2*a*b*d*n*(f*x)**m/(f*m**2) + a*b*e*x**m*(f*x)**m*lo
g(c*x**n)/(f*m) - a*b*e*n*x**m*(f*x)**m/(2*f*m**2) + b**2*d*(f*x)**m*log(c*x**n)**2/(f*m) - 2*b**2*d*n*(f*x)**
m*log(c*x**n)/(f*m**2) + 2*b**2*d*n**2*(f*x)**m/(f*m**3) + b**2*e*x**m*(f*x)**m*log(c*x**n)**2/(2*f*m) - b**2*
e*n*x**m*(f*x)**m*log(c*x**n)/(2*f*m**2) + b**2*e*n**2*x**m*(f*x)**m/(4*f*m**3), True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 445 vs. \(2 (218) = 436\).
time = 8.65, size = 445, normalized size = 1.97 \begin {gather*} \frac {b^{2} d f^{m} n^{2} x^{m} \log \left (x\right )^{2}}{f m} + \frac {b^{2} f^{m} n^{2} x^{2 \, m} e \log \left (x\right )^{2}}{2 \, f m} + \frac {2 \, b^{2} d f^{m} n x^{m} \log \left (c\right ) \log \left (x\right )}{f m} + \frac {b^{2} f^{m} n x^{2 \, m} e \log \left (c\right ) \log \left (x\right )}{f m} + \frac {b^{2} d f^{m} x^{m} \log \left (c\right )^{2}}{f m} + \frac {b^{2} f^{m} x^{2 \, m} e \log \left (c\right )^{2}}{2 \, f m} + \frac {2 \, a b d f^{m} n x^{m} \log \left (x\right )}{f m} - \frac {2 \, b^{2} d f^{m} n^{2} x^{m} \log \left (x\right )}{f m^{2}} + \frac {a b f^{m} n x^{2 \, m} e \log \left (x\right )}{f m} - \frac {b^{2} f^{m} n^{2} x^{2 \, m} e \log \left (x\right )}{2 \, f m^{2}} + \frac {2 \, a b d f^{m} x^{m} \log \left (c\right )}{f m} - \frac {2 \, b^{2} d f^{m} n x^{m} \log \left (c\right )}{f m^{2}} + \frac {a b f^{m} x^{2 \, m} e \log \left (c\right )}{f m} - \frac {b^{2} f^{m} n x^{2 \, m} e \log \left (c\right )}{2 \, f m^{2}} + \frac {a^{2} d f^{m} x^{m}}{f m} - \frac {2 \, a b d f^{m} n x^{m}}{f m^{2}} + \frac {2 \, b^{2} d f^{m} n^{2} x^{m}}{f m^{3}} + \frac {a^{2} f^{m} x^{2 \, m} e}{2 \, f m} - \frac {a b f^{m} n x^{2 \, m} e}{2 \, f m^{2}} + \frac {b^{2} f^{m} n^{2} x^{2 \, m} e}{4 \, f m^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x)^(-1+m)*(d+e*x^m)*(a+b*log(c*x^n))^2,x, algorithm="giac")

[Out]

b^2*d*f^m*n^2*x^m*log(x)^2/(f*m) + 1/2*b^2*f^m*n^2*x^(2*m)*e*log(x)^2/(f*m) + 2*b^2*d*f^m*n*x^m*log(c)*log(x)/
(f*m) + b^2*f^m*n*x^(2*m)*e*log(c)*log(x)/(f*m) + b^2*d*f^m*x^m*log(c)^2/(f*m) + 1/2*b^2*f^m*x^(2*m)*e*log(c)^
2/(f*m) + 2*a*b*d*f^m*n*x^m*log(x)/(f*m) - 2*b^2*d*f^m*n^2*x^m*log(x)/(f*m^2) + a*b*f^m*n*x^(2*m)*e*log(x)/(f*
m) - 1/2*b^2*f^m*n^2*x^(2*m)*e*log(x)/(f*m^2) + 2*a*b*d*f^m*x^m*log(c)/(f*m) - 2*b^2*d*f^m*n*x^m*log(c)/(f*m^2
) + a*b*f^m*x^(2*m)*e*log(c)/(f*m) - 1/2*b^2*f^m*n*x^(2*m)*e*log(c)/(f*m^2) + a^2*d*f^m*x^m/(f*m) - 2*a*b*d*f^
m*n*x^m/(f*m^2) + 2*b^2*d*f^m*n^2*x^m/(f*m^3) + 1/2*a^2*f^m*x^(2*m)*e/(f*m) - 1/2*a*b*f^m*n*x^(2*m)*e/(f*m^2)
+ 1/4*b^2*f^m*n^2*x^(2*m)*e/(f*m^3)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\left (f\,x\right )}^{m-1}\,\left (d+e\,x^m\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2 \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x)^(m - 1)*(d + e*x^m)*(a + b*log(c*x^n))^2,x)

[Out]

int((f*x)^(m - 1)*(d + e*x^m)*(a + b*log(c*x^n))^2, x)

________________________________________________________________________________________